﻿<Application x:Class="WpfVkontacteClient.App"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
			 xmlns:Microsoft_Windows_Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Classic">
	<Application.Resources>
		<ResourceDictionary>
			<ResourceDictionary.MergedDictionaries>
				<ResourceDictionary Source="Styles\WindowTemplate2.xaml"/>
				<ResourceDictionary Source="Styles\Slider.xaml"/>
				<ResourceDictionary Source="Styles\Image.xaml"/>
				<ResourceDictionary Source="Styles\Colors.xaml"/>
				<ResourceDictionary Source="Styles\NewScrollBar.xaml"/>
				<ResourceDictionary Source="Styles\NewScrollBar2.xaml"/>
            </ResourceDictionary.MergedDictionaries>
            <Style x:Key="MyButtonGlowStyle" TargetType="{x:Type Button}">
				<!--<Setter Property="FocusVisualStyle" Value="{StaticResource ButtonFocusVisual}"/>-->
				<Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/>
				<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
				<Setter Property="BorderBrush" Value="{x:Static Microsoft_Windows_Themes:ClassicBorderDecorator.ClassicBorderBrush}"/>
				<Setter Property="BorderThickness" Value="3"/>
				<Setter Property="HorizontalContentAlignment" Value="Center"/>
				<Setter Property="VerticalContentAlignment" Value="Center"/>
				<Setter Property="Foreground" Value="White"/>
				<Setter Property="Padding" Value="0,0,1,1"/>
				<Setter Property="Template">
					<Setter.Value>
						<ControlTemplate TargetType="{x:Type Button}">
							<ControlTemplate.Resources>
								<Storyboard x:Key="MouseEnter">
									<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="glow">
										<EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="0.8"/>
									</DoubleAnimationUsingKeyFrames>
									<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="glass">
										<EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="0"/>
									</DoubleAnimationUsingKeyFrames>
								</Storyboard>
								<Storyboard x:Key="MouseLeave">
									<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="glow">
										<EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="0.01"/>
									</DoubleAnimationUsingKeyFrames>
									<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="glass">
										<EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="0.99"/>
									</DoubleAnimationUsingKeyFrames>
								</Storyboard>
							</ControlTemplate.Resources>
							<Grid Margin="0,0,0,0">
								<Rectangle x:Name="base_color" RadiusY="6" RadiusX="6" Fill="Black" />
								<Rectangle x:Name="glow" RadiusY="6" RadiusX="6" Opacity="0">
									<Rectangle.Fill>
										<RadialGradientBrush Center="0.493,0.975" GradientOrigin="0.493,0.975" RadiusY="0.838" RadiusX="0.838">
											<GradientStop Color="#002C26EF" Offset="0.082"/>
											<GradientStop Color="White" Offset="1"/>
										</RadialGradientBrush>
									</Rectangle.Fill>
								</Rectangle>
								<Rectangle x:Name="glass" RadiusY="6" RadiusX="6" Cursor="Hand">
									<Rectangle.Fill>
										<LinearGradientBrush EndPoint="0.498,0" StartPoint="0.499,0.699">
											<GradientStop Color="#00000000" Offset="0"/>
											<GradientStop Color="White" Offset="1"/>
											<GradientStop Color="#AEB4B4B4" Offset="0.682"/>
											<GradientStop Color="#25262626" Offset="0.614"/>
										</LinearGradientBrush>
									</Rectangle.Fill>
								</Rectangle>
								<ContentPresenter Margin="0" HorizontalAlignment="Center" VerticalAlignment="Center" 
										  x:Name="content"/>
							</Grid>
							<ControlTemplate.Triggers>
								<EventTrigger RoutedEvent="Mouse.MouseLeave" SourceName="glass">
									<BeginStoryboard x:Name="MouseLeave_BeginStoryboard" Storyboard="{StaticResource MouseLeave}"/>
								</EventTrigger>
								<EventTrigger RoutedEvent="Mouse.MouseEnter" SourceName="glass">
									<BeginStoryboard Storyboard="{StaticResource MouseEnter}"/>
								</EventTrigger>
								<EventTrigger RoutedEvent="Mouse.MouseEnter" SourceName="content">
									<BeginStoryboard Storyboard="{StaticResource MouseEnter}"/>
								</EventTrigger>
								<EventTrigger RoutedEvent="Mouse.MouseLeave" SourceName="content">
									<BeginStoryboard x:Name="MouseLeave_BeginStoryboard2" Storyboard="{StaticResource MouseLeave}"/>
								</EventTrigger>
								<Trigger Property="IsKeyboardFocused" Value="true"/>
								<Trigger Property="IsDefaulted" Value="true"/>
								<Trigger Property="IsPressed" Value="true"/>
								<Trigger Property="ToggleButton.IsChecked" Value="true"/>
								<Trigger Property="IsEnabled" Value="false">
									<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
								</Trigger>
							</ControlTemplate.Triggers>
						</ControlTemplate>
					</Setter.Value>
				</Setter>
			</Style>
		</ResourceDictionary>
	</Application.Resources>
</Application>
